package com.wjy.demo.error;


import lombok.Getter;

@Getter
public class ServiceException  extends RuntimeException{
    private Integer code;

    public ServiceException(ErrorType type) {
        super(type.getMsg());
        this.code = type.getCode();
    }

    public ServiceException(Integer code, String msg) {
        super(msg);
        this.code = code;
    }
}